package br.com.amadeus.android.graphics;

import br.com.amadeus.android.activities.home.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebView;

public class Linear extends Activity
{
	private Intent intent;
	private String params;
	private WebView graficoWebView;
	
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.layout_web_view);
		
		/*recebendo os dados do formul�rio para carregar o gr�fico*/
		intent = getIntent();
		params = intent.getStringExtra("msg");
		
		this.graficoWebView = (WebView) findViewById(R.id.graficoWebView);
		graficoWebView.getSettings().setJavaScriptEnabled(true);
		
		String url = "http://chart.apis.google.com/chart?" +
					 "cht=lc&chs=300x325&chtt=Desempenho%20do%20Sport&chxt=x,y" +
					 "&chxl=0:|Inicio|Meio|Fim|1:|P�ssimo|Horr�vel|Ruim|Bom&chg=20,50&chd=t:"+ params;
		
		graficoWebView.loadUrl(url);
	}
}
